To Configure WSG
Follow these
instructions to configure and install WSG.
Note: If you receive an
error message in
AssetWise
CONNECT Edition related to WSG, see
Troubleshooting.
- Browse to locate and launch the latest WSG build.
- Run Bentley Web Services Gateway 02.06.msi.
- Click Install.
- Click Next, accept the End User License Agreement, then select an install directory, and then click Finish.
- From the same directory, locate and run the latest version of the WSG eB plugin, Bentley WSG eB plugin vXXXX, where XXXX represents the latest version number.
- From the Start menu, select Deploy Bentley Web Services Gateway 02.06.
- Select the website to which the website will be added.
- Enter an application name, for example, "wsg".
- Confirm that Use URL redirection is not selected.
- Select a directory for temporary files, and in the second box enter a "*" for the URL of trusted origins. For example,
- Select the Bentley eB Plugin plugin, and then click Next.
- In Backend Servers, enter the fully qualified domain name(s) of the child AssetWise backend server(s).
- Leave Https Only Domains blank, and then click Next.
- Leave eB Default Document Creation Settings List blank.
- Click Deploy.
- Browse to the WSG installation folder, for example, C:\inetpub\wwwroot\WSG, and then using a text editor, open web.config.
-
You can enter
3000 for the httpRuntime maxUrlLength value,
if you want WSG to accommodate larger URL names.
For example:
<configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.5" /> </startup> <system.web> <httpRuntime maxUrlLength="3000" />
-
After deployment, include the following
<assemblyBinding> content within
<configuration> <runtime> sections:
<assemblyBinding> <dependentAssembly> <assemblyIdentity name="System.IdentityModel.Tokens.Jwt" publicKeyToken="31bf3856ad364e35" culture="neutral"/>\ <bindingRedirect oldVersion="1.0.0.0-6.23.1.0" newVersion="6.23.1.0"/>\ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>\ <bindingRedirect oldVersion="4.0.0.0-6.0.0.2" newVersion="6.0.0.2"/>\ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="IdentityModel" publicKeyToken="null" culture="neutral"/>\ <bindingRedirect oldVersion="1.0.0.0-5.2.0.0" newVersion="5.2.0.0"/>\ </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />\ <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />\ </dependentAssembly> </assemblyBinding>
-
After deployment, edit the value assigned to
AccessControlAllowOrigin value to
"*". To have tighter security, set this value to the
known website URL(s) that will be communicating with WSG ([http or
https]://[domain or machine]/[website name].
For example,
<add key="AccessControlAllowOrigin" value="*" />
-
If you are in a non-production environment (i.e., demo) and are
not using https, you can set the
AllowNonSecureHttp value to
"true". This step is optional.
For example,
<add key="AllowNonSecureHttp" value="true" />
-
If you are running in QA and a self-signed certificate is being
used by
AssetWise, manually add each of the following
keys:
<add key="Bentley.eB.HttpsOnlyDomains" value="" /> <add key="Bentley.eB.StsTokenLifetime" value="60" /> <add key="Bentley.eB.ImsAuthUri" value="https://qa-ims.bentley.com/" /> <add key="Bentley.eB.StsFederationMetadataUri" value="federationmetadata/2007-06/federationmetadata.xml" /> <add key="Bentley.eB.SslValidationMode" value="Ignore" /> <add key="Bentley.eB.ImsRoot" value="https://qa-ims.bentley.com/" /> <add key="Bentley.eB.StsIssuerName" value="https://qa-ims.bentley.com/" /> <add key="Bentley.eB.StsIssuerCertificate" value="C28EFD602F631BD2FBCD38A3402C88A87AA5379A" />
-
For enhanced performance, confirm that the
system.web
compilation.debug attribute value is set to
"false".
For example,
<system.web> <compilation debug="false" targetFramework="4.6.2" />
-
To control how frequently the plugin checks for an updated
AssetWise EC Schema document the synchronization
time, add an
<appSettings> key to
ecom.config, as follows:
<add key="EBSchemaSynchronizationTimeInSeconds" value="30000"/>
Tip: Set the value to represent the wait time before WSG checks for updates. Note that this value affects performance of the web application, therefore, consider using a low number during initial setup, and then increasing its value after the initial setup has been completed, and normal operation is in effect. \See "Configuring schema synchronization time in eB EC Plugin", in Web Services Gateway (WSG) API 2.5, for more details. -
In
ecom.config, locate the
<EBECPluginCommunity List> section
within the
<SupplementalSchemas> section, and
insert a
<Community> </Community> section
including the domain name, community name, user name and password for each
AssetWise Community that it serves.
For example, the following community list
displays two communities,
"community1" and
"community2":
</SupplementalSchemas> <EBECPluginCommunityList> <Community> <DomainName>server. hosting.com</DomainName> <CommunityName> community1 </CommunityName> <UserName>admin</UserName> <Password>password</Password> </Community> <Community> <DomainName>server.bentley.com</DomainName> <CommunityName>community2</CommunityName> <UserName>admin</UserName> <Password> password </Password> </Community> </EBECPluginCommunityList> <ServiceVersions>
- Open a command prompt in Administrator mode, and perform an IISReset to ensure that any changes made to web.config and/or ecom.config are updated.